//本地储存

$(document).ready(function() {
	//	getAjaxFabZone("http://qingzhao.nat300.top/fanZone/test/json")
	//	$("#session").innerHTML=sessionStorage.openid
	
//	document.getElementById("session").innerHTML=getOpenid()
	saveOpenId()
})

function saveOpenId() {
	if(typeof(Storage) !== "undefined") {
		if(sessionStorage.openid) {
			console.log(sessionStorage.openid)
		} else {
			$.ajax({
			
				type: "get",
			
				url: "http://qingzhao.nat300.top/fanZone/test/json",
			
				cache: false,
			
				async: false,
			
				success: function(data) {
					a = data.data
//					alert(a)
					for(var i in a) {
//						alert(a[i])
						sessionStorage.openid=a[i]
					}
				}
			
			});
		}
	} else {
		document.getElementById("session").innerHTML = "对不起，您的浏览器不支持 web 存储。";
	}
}



//点击转到相应的url
function load(a){
	h=a+sessionStorage.openid
	window.location.href=h
}
